/*
2021-10-26
https://www.acwing.com/problem/content/4005/
*/
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;
typedef long long ll;
const int N=12,M=1e3+5;
const int mod=1000000007;
ll f[N][M];
int n,m;

int main()
{
    cin>>m>>n;
    f[0][1]=1;
    ll res=0;
    for(int i=1;i<=n+1;i++)
        for(int j=1;j<=m;j++)
            f[i][j]=(f[i][j-1]+f[i-1][j])%mod;

    for(int i=1;i<=m;i++)
    {
        res=(res+f[n][i]*f[n+1][m-i+1]%mod)%mod;
    }
    cout<<res<<endl;
    return 0;
}

